package com.example.wuqujingdianphone.utils;

import android.content.Context;
import android.widget.Toast;


/**
 * @author by niuzilin on 2016/12/8.
 * @about :读取assets里面的json
 */

public class AssetsUtils {

    public static String readJson(Context context, String assetsJson) {
        String json = "";
        try {
            json = ConvertUtils.toString(context.getAssets().open(assetsJson));
        } catch (Exception e) {
            Toast.makeText(context,e.toString(), Toast.LENGTH_SHORT).show();
        }
        return json;
    }
}
